<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>字符串可以是对象</title>
</head>
<body>
<p id="demo"></p>

<script>
  var x="Bill";  // x 是字符串
  var y=new String("Bill");  // y 是对象

  document.getElementById("demo").innerHTML=typeof x+" <br> " + typeof y;
</script>
</body>
</html>
<!--字符串也可通过关键词 new 定义为对象-->